package com.edu.exam.enums.grading.analysis;

/**
 * 可视化图表类型枚举
 *
 * <p>定义了可视化图表的各种类型，用于区分不同的数据展示方式。</p>
 *
 * @author 系统生成
 * @version 1.0
 * @since 2025-11-14
 */
public enum VisualizationChartType {
    /** 柱状图 */
    BAR("柱状图"),
    
    /** 折线图 */
    LINE("折线图"),
    
    /** 饼图 */
    PIE("饼图"),
    
    /** 散点图 */
    SCATTER("散点图"),
    
    /** 直方图 */
    HISTOGRAM("直方图"),
    
    /** 箱线图 */
    BOXPLOT("箱线图"),
    
    /** 热力图 */
    HEATMAP("热力图"),
    
    /** 雷达图 */
    RADAR("雷达图"),
    
    /** 面积图 */
    AREA("面积图"),
    
    /** 气泡图 */
    BUBBLE("气泡图"),
    
    /** 漏斗图 */
    FUNNEL("漏斗图"),
    
    /** 仪表盘 */
    GAUGE("仪表盘"),
    
    /** 桑基图 */
    SANKEY("桑基图"),
    
    /** 词云图 */
    WORDCLOUD("词云图"),
    
    /** 地图 */
    MAP("地图"),
    
    /** 组合图 */
    COMBO("组合图"),
    
    /** 自定义图 */
    CUSTOM("自定义图");

    private final String description;

    VisualizationChartType(String description) {
        this.description = description;
    }

    /**
     * 获取枚举的描述信息
     *
     * @return 描述信息
     */
    public String getDescription() {
        return description;
    }

    /**
     * 获取显示名称
     *
     * @return 显示名称
     */
    public String getDisplayName() {
        return description;
    }

    /**
     * 检查是否为基本图表类型
     *
     * @return 如果是基本图表类型返回true，否则返回false
     */
    public boolean isBasicType() {
        return this == BAR || this == LINE || this == PIE || this == SCATTER;
    }

    /**
     * 检查是否为统计图表类型
     *
     * @return 如果是统计图表类型返回true，否则返回false
     */
    public boolean isStatisticalType() {
        return this == HISTOGRAM || this == BOXPLOT || this == HEATMAP;
    }

    /**
     * 检查是否为高级图表类型
     *
     * @return 如果是高级图表类型返回true，否则返回false
     */
    public boolean isAdvancedType() {
        return this == RADAR || this == AREA || this == BUBBLE || this == FUNNEL || 
               this == GAUGE || this == SANKEY || this == WORDCLOUD || this == MAP;
    }

    /**
     * 检查是否为组合图表类型
     *
     * @return 如果是组合图表类型返回true，否则返回false
     */
    public boolean isComboType() {
        return this == COMBO;
    }

    /**
     * 检查是否为自定义图表类型
     *
     * @return 如果是自定义图表类型返回true，否则返回false
     */
    public boolean isCustomType() {
        return this == CUSTOM;
    }

    /**
     * 检查是否为分类图表
     *
     * @return 如果是分类图表返回true，否则返回false
     */
    public boolean isCategoricalChart() {
        return this == PIE || this == BAR || this == FUNNEL || this == WORDCLOUD;
    }

    /**
     * 检查是否为趋势图表
     *
     * @return 如果是趋势图表返回true，否则返回false
     */
    public boolean isTrendChart() {
        return this == LINE || this == AREA || this == BUBBLE;
    }

    /**
     * 检查是否为分布图表
     *
     * @return 如果是分布图表返回true，否则返回false
     */
    public boolean isDistributionChart() {
        return this == HISTOGRAM || this == BOXPLOT || this == SCATTER || this == HEATMAP;
    }

    /**
     * 检查是否为多维图表
     *
     * @return 如果是多维图表返回true，否则返回false
     */
    public boolean isMultidimensionalChart() {
        return this == RADAR || this == MAP || this == SANKEY;
    }

    /**
     * 检查是否需要坐标轴
     *
     * @return 如果需要坐标轴返回true，否则返回false
     */
    public boolean requiresAxes() {
        return this == BAR || this == LINE || this == SCATTER || this == HISTOGRAM || 
               this == BOXPLOT || this == AREA || this == BUBBLE;
    }

    /**
     * 检查是否支持多系列数据
     *
     * @return 如果支持多系列数据返回true，否则返回false
     */
    public boolean supportsMultipleSeries() {
        return this != PIE && this != GAUGE && this != WORDCLOUD;
    }

    /**
     * 检查是否支持动画效果
     *
     * @return 如果支持动画效果返回true，否则返回false
     */
    public boolean supportsAnimation() {
        return this == BAR || this == LINE || this == PIE || this == AREA || 
               this == BUBBLE || this == RADAR || this == FUNNEL || this == GAUGE;
    }

    /**
     * 检查是否适合大数据集
     *
     * @return 如果适合大数据集返回true，否则返回false
     */
    public boolean isSuitableForLargeData() {
        return this == SCATTER || this == HEATMAP || this == LINE || this == AREA;
    }
}